package me.acomma.groot.application.menu;

import me.acomma.groot.domain.menu.Menu;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;

@Mapper(componentModel = "spring")
public interface MenuAssembler {
    @Mappings({
            @Mapping(target = "menuId", source = "menuId.id"),
            @Mapping(target = "parentId", source = "parentId.id"),
    })
    MenuData toMenuData(Menu menu);
}
